app.controller('compelOffLease', function($element, ngDialog ,$scope, $state, rest, user,uploadConf,tipService,uiLoad,$localStorage) {
    var data = angular.copy($scope.ngDialogData, {});
    $scope.params = {
      initiatorOpenId: user.get('openId')
    };
    
    console.log(data);
    $scope.$on('rentTime.start', function(event, data) {
        $scope.params.exitDate = data + " 00:00:00";
    })

    $scope.params.contractId = data.contractId;
    $scope.params.statusName = data.status;
    // $scope.params.exitDate = data.exitDate;
    //点击确定按钮
    $scope.modifySure = function() {
      console.log(data);
      $scope.closeThisDialog({clickOk: true});
      rest.post({
          methodId: '1050',
          data: $scope.params,
          success: function(res) {
              if (res.code == 0) {
                  tipService.show("body", {
                      message: "强制退租成功,跳转中......"
                  }, 3);
              } else {
                  tipService.show("body", {
                      message: res.res.msg,
                      notice: "danger"
                  }, 3);
              }
          },
          error: function() {
              btn.removeClass('disabled');
          }
      })
    }

});
